<#----- 模板文件 -->
<#---->

<#---->

<#assign name="张三">
<#assign age=18 num=[1,2,3,4,5]>

${ name}
${ age}
${num?join( "。")}
<hr>

<#--if指令标签-->

<#if age lt 18 >
    <h1> 成年人</h1>
    <#elseif age gt 18>
    <h1>未成年人</h1>
        <#else>
    <h1>18</h1>
</#if>

<#assign user2=["张三","李四","王五"]>
<hr>
<#if user2??>
    <#list user2 as user>
        <h1>${user}</h1>
    </#list>
    <#else>
        <h1>没有用户</h1>

</#if>


<hr>
<#macro test>
    <h1>这是宏定义</h1>
</#macro>

<@test> </@test>

<hr>
<#macro test2 name1,age1,num1>
    ${name1}--${age1}--${num1}
</#macro>

<@test2 name1="张三" age1="18" num1="[1,2,3,4,5]"> </@test2>

<hr>
<#macro cfb j>
    <#list 1..j as i>
        <#list 1..i as j>
            ${i}*${j}=${i*j}&nbsp;
        </#list>
        <br>
    </#list>
</#macro>

<@cfb j=5> </@cfb>
<@cfb j=9> </@cfb>
<hr>
<#macro test3>
    <h1>占位符的使用</h1>
    <#nested >
</#macro>

<@test3>哈哈哈</@test3>



